import request from '@/utils/request'

export function getMenusSelect() {
    return request({
        url: '/rabc/menus/getSelectLists',
        method: 'get'
    })
}
export function getMasterDetail(params) {
    return request({
        url: '/rabc/menus/detail',
        method: 'get',
        params
    })
}
export function getMenus(params, get_url = false) {
    var url = '/rabc/menus';
    if (get_url) return url;
    return request({
        url: url,
        method: 'get',
        params
    })
}

export function createMenus(data, get_url = false) {
    var url = `/rabc/menus/create`;
    if (get_url) return url;
    return request({
        url: url,
        method: 'post',
        data
    })
}

export function updateMenus(data, get_url = false) {
    var url = `/rabc/menus/update`;
    if (get_url) return url;
    return request({
        url: url,
        method: 'put',
        data
    })
}

export function delMenus(data, get_url = false) {
    var url = `/rabc/menus/delete`;
    if (get_url) return url;
    return request({
        url: url,
        method: 'delete',
        data
    })
}

export function changeFiledStatus(data, get_url = false) {
    var url = `/rabc/menus/changeFiledStatus`;
    if (get_url) return url;
    return request({
        url: url,
        method: 'put',
        data
    })
}
